/** 
 *  OLMAP 方法函数
 *  script操作方法 
 *  @author Goog2023
 */
// 引入js脚本文件
function fCreateDOM(type = 'script', path = './static/js/ol.js', callback, insertPosition = 'afterbegin') {
	let parentDOM = document.body;
	const dom = document.createElement(type);
	if (type == 'link') {
		parentDOM = document.head;
		dom.href = path;		
		dom.rel = 'stylesheet';
		dom.type = 'text/css'
	} else {
		dom.src = path;
	}
	parentDOM.insertAdjacentElement(insertPosition, dom);
	dom.onload = () => {
		typeof(callback) == 'function' && callback();
	}
}

export {
	fCreateDOM, // 2023-10-28 22:41:38
}